package com.gc.frontend.web.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.gc.common.exception.RollBackException;
import com.gc.frontend.service.PeopleService;

/**
 * 
 * @author 章瑱彬 
 * 电话：15914921094
 * QQ：562800930
 * @since 2015年3月10日
 */
@Controller
@RequestMapping("/people")
public class PeopleController {
	@Autowired
	private PeopleService peopleService;
	
	@RequestMapping("/test")
	@ResponseBody
	public String test(HttpServletRequest request, HttpServletResponse response){
		try {
			peopleService.testTx();
		} catch (RollBackException e) {
			e.printStackTrace();
		}
		return "main";
	}
}
